﻿using NearAop.Interfaces;
using System;
using System.Collections.Generic;

namespace NearAop
{
    /// <summary>
    /// 标记设置取消AOP操作(最高优先级)
    /// </summary>
    [AttributeUsage(AttributeTargets.Method | AttributeTargets.Event
                  | AttributeTargets.Field | AttributeTargets.Property
                  | AttributeTargets.Class)]
    public sealed class SetCancelAopAttribute : Attribute, IAopSetCancel
    {
        public SetCancelAopAttribute() { }

        public SetCancelAopAttribute(params Type[] types) => CancelTypes = types;

        public IEnumerable<Type> CancelTypes { get; }
    }
}
